import 'package:flutter_app_study/bean/up_data_entity.dart';

upDataEntityFromJson(UpDataEntity data, Map<String, dynamic> json) {
	if (json['respCode'] != null) {
		data.respCode = json['respCode']?.toString();
	}
	if (json['versionCode'] != null) {
		data.versionCode = json['versionCode']?.toInt();
	}
	if (json['downloadUrl'] != null) {
		data.downloadUrl = json['downloadUrl']?.toString();
	}
	if (json['updateInfo'] != null) {
		data.updateInfo = json['updateInfo']?.toString();
	}
	if (json['mustUpdate'] != null) {
		data.mustUpdate = json['mustUpdate']?.toInt();
	}
	if (json['clearData'] != null) {
		data.clearData = json['clearData']?.toInt();
	}
	return data;
}

Map<String, dynamic> upDataEntityToJson(UpDataEntity entity) {
	final Map<String, dynamic> data = new Map<String, dynamic>();
	data['respCode'] = entity.respCode;
	data['versionCode'] = entity.versionCode;
	data['downloadUrl'] = entity.downloadUrl;
	data['updateInfo'] = entity.updateInfo;
	data['mustUpdate'] = entity.mustUpdate;
	data['clearData'] = entity.clearData;
	return data;
}